<template>
  <li>
    <div v-show="quoteList.length">
      <p class="wid97">
        <span class="txt h2-txt" :class="color">
          <span :title="title" v-text="title" @click="scrollTo(id)"></span>
        </span>
      </p>
    </div>
  </li>
</template>
<script>
  import { mapState, mapGetters, mapActions } from 'vuex'
  export default {
    data() {
      return {
        title: $.i18n('content_reference'),
        id: 'quoteList'
      }
    },
    computed: {
      ...mapState(['quoteList', 'curIndex']),
      color() {
        if(this.id === this.curIndex) return 'color-2f';
      }
    },
    methods: {
      ...mapActions(['scrollTo'])
    }
  }
</script>